<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\controller;

/**
 * 店铺信息控制器
 */
class Create extends AdminBase
{
    
    /**
     * 店铺信息列表
     */
      public function createList()
    {
        
        $this->assign('list', $this->logicCreate->getCreateList());
        
        return $this->fetch('create_list');
    }

     /**
     * 店铺信息添加
     */
    public function createAdd()
    {
        
        IS_POST && $this->jump($this->logicCreate->createEdit($this->param));
        
        return $this->fetch('create_edit');
    }
    /**
     * 店铺信息编辑
     */
    public function createEdit()
    {
        
        IS_POST && $this->jump($this->logicCreate->createEdit($this->param));
        
        $info = $this->logicCreate->getCreateInfo(['id' => $this->param['id']]);
        
        $this->assign('info', $info);
        
        return $this->fetch('create_edit');
    }
    
    /**
     * 店铺信息删除
     */
    public function createDel($id = 0)
    {
        
        $this->jump($this->logicCreate->createDel(['id' => $id]));
    }

}
